home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Educational / PrimeSpiral / Source / SpiralOps.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-06-12  |  2.7 KB  |  92 lines

  1. /* SpiralOps.c generated from SpiralOps.psw
  2.    by unix pswrap V1.009  Wed Apr 19 17:50:24 PDT 1989
  3.  */
  4.  
  5. #include <dpsclient/dpsfriends.h>
  6. #include <string.h>
  7.  
  8. #line 1 "SpiralOps.psw"
  9. /* File:    SpiralOps.psw - Random PostScript routines for 'PrimeSpiral'
  10.  *
  11.  * By:        Christopher Lane
  12.  *        Symbolic Systems Resources Group
  13.  *        Knowledge Systems Laboratory
  14.  *        Stanford University
  15.  *
  16.  * Date:    9 March 1990
  17.  *
  18.  * Copyright:    1990 by The Leland Stanford Junior University.  This program
  19.  *        may be distributed without restriction for non-commercial use.
  20.  */
  21. #line 22 "SpiralOps.c"
  22. void PSdrawAt(float x, float y)
  23. {
  24.   typedef struct {
  25.     unsigned char tokenType;
  26.     unsigned char topLevelCount;
  27.     unsigned short nBytes;
  28.  
  29.     DPSBinObjReal obj0;
  30.     DPSBinObjReal obj1;
  31.     DPSBinObjGeneric obj2;
  32.     DPSBinObjGeneric obj3;
  33.     DPSBinObjGeneric obj4;
  34.     } _dpsQ;
  35.   static const _dpsQ _dpsStat = {
  36.     DPS_DEF_TOKENTYPE, 5, 44,
  37.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: x */
  38.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: y */
  39.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  40.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  41.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 128},    /* rectfill */
  42.     }; /* _dpsQ */
  43.   _dpsQ _dpsF;    /* local copy  */
  44.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  45.   char pad[3];
  46.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  47.   _dpsF = _dpsStat;    /* assign automatic variable */
  48.  
  49.   _dpsP[0].val.realVal = x;
  50.   _dpsP[1].val.realVal = y;
  51.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,44);
  52.   if (0) *pad = 0;    /* quiets compiler warnings */
  53. }
  54. #line 16 "SpiralOps.psw"
  55.  
  56. #line 57 "SpiralOps.c"
  57. void PSclearToGray(float gray)
  58. {
  59.   typedef struct {
  60.     unsigned char tokenType;
  61.     unsigned char topLevelCount;
  62.     unsigned short nBytes;
  63.  
  64.     DPSBinObjGeneric obj0;
  65.     DPSBinObjReal obj1;
  66.     DPSBinObjGeneric obj2;
  67.     DPSBinObjGeneric obj3;
  68.     DPSBinObjGeneric obj4;
  69.     DPSBinObjGeneric obj5;
  70.     } _dpsQ;
  71.   static const _dpsQ _dpsStat = {
  72.     DPS_DEF_TOKENTYPE, 6, 52,
  73.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 33},    /* currentgray */
  74.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: gray */
  75.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 150},    /* setgray */
  76.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 21},    /* clippath */
  77.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 66},    /* fill */
  78.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 150},    /* setgray */
  79.     }; /* _dpsQ */
  80.   _dpsQ _dpsF;    /* local copy  */
  81.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  82.   char pad[3];
  83.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  84.   _dpsF = _dpsStat;    /* assign automatic variable */
  85.  
  86.   _dpsP[1].val.realVal = gray;
  87.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,52);
  88.   if (0) *pad = 0;    /* quiets compiler warnings */
  89. }
  90. #line 24 "SpiralOps.psw"
  91.  
  92.